package com.dragon.modules.yuegou.query.product;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.product.CoupTemplateSkuRefEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

/**
 * 商品券模板与商品对应关系表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2021-05-11 16:55:17
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class CoupTemplateSkuRefQuery extends CoupTemplateSkuRefEntity implements Query<CoupTemplateSkuRefEntity>{

    /** 模板ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 模板ID查询条件 */
	@JsonUnwrapped(prefix = "coupTemplateId")
	private Condition<String> coupTemplateIdCondition;

    /** spuId查询条件 */
	@JsonUnwrapped(prefix = "spuId")
	private Condition<String> spuIdCondition;

    /** SkuId查询条件 */
	@JsonUnwrapped(prefix = "skuId")
	private Condition<String> skuIdCondition;

    /** 数量查询条件 */
	@JsonUnwrapped(prefix = "quantity")
	private Condition<Integer> quantityCondition;

    /** 总数量查询条件 */
	@JsonUnwrapped(prefix = "totalQuantity")
	private Condition<Integer> totalQuantityCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public CoupTemplateSkuRefQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public CoupTemplateSkuRefQuery(CoupTemplateSkuRefEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public CoupTemplateSkuRefQuery(CoupTemplateSkuRefQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.coupTemplateIdCondition != null) {
			this.coupTemplateIdCondition = other.coupTemplateIdCondition.copy();
		}
		if(other.spuIdCondition != null) {
			this.spuIdCondition = other.spuIdCondition.copy();
		}
		if(other.skuIdCondition != null) {
			this.skuIdCondition = other.skuIdCondition.copy();
		}
		if(other.quantityCondition != null) {
			this.quantityCondition = other.quantityCondition.copy();
		}
		if(other.totalQuantityCondition != null) {
			this.totalQuantityCondition = other.totalQuantityCondition.copy();
		}
	}

	@Override
	public QueryWrapper<CoupTemplateSkuRefEntity> toQueryWrapper() {
		QueryWrapper<CoupTemplateSkuRefEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (coupTemplateIdCondition != null) {
			coupTemplateIdCondition.toWrapper(wrapper, COL_COUP_TEMPLATE_ID);
		}
		if (spuIdCondition != null) {
			spuIdCondition.toWrapper(wrapper, COL_SPU_ID);
		}
		if (skuIdCondition != null) {
			skuIdCondition.toWrapper(wrapper, COL_SKU_ID);
		}
		if (quantityCondition != null) {
			quantityCondition.toWrapper(wrapper, COL_QUANTITY);
		}
		if (totalQuantityCondition != null) {
			totalQuantityCondition.toWrapper(wrapper, COL_TOTAL_QUANTITY);
		}
		return wrapper;
	}

	/**
	 * 构造并返回模板ID查询条件
	 * 
	 * @return idCondition 模板ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取模板ID查询条件
	 * 
	 * @return idCondition 模板ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置模板ID查询条件
	 * 
	 * @param idCondition 模板ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回模板ID查询条件
	 * 
	 * @return coupTemplateIdCondition 模板ID查询条件
	 */
	public Condition<String> coupTemplateId() {
		this.coupTemplateIdCondition = new Condition<>();
		return this.coupTemplateIdCondition;
	}
	
	/**
	 * 获取模板ID查询条件
	 * 
	 * @return coupTemplateIdCondition 模板ID查询条件
	 */
	public Condition<String> getCoupTemplateIdCondition() {
		return coupTemplateIdCondition;
	}

	/**
	 * 设置模板ID查询条件
	 * 
	 * @param coupTemplateIdCondition 模板ID查询条件
	 */
	public void setCoupTemplateIdCondition(Condition<String> coupTemplateIdCondition) {
		this.coupTemplateIdCondition = coupTemplateIdCondition;
	}

	/**
	 * 构造并返回spuId查询条件
	 * 
	 * @return spuIdCondition spuId查询条件
	 */
	public Condition<String> spuId() {
		this.spuIdCondition = new Condition<>();
		return this.spuIdCondition;
	}
	
	/**
	 * 获取spuId查询条件
	 * 
	 * @return spuIdCondition spuId查询条件
	 */
	public Condition<String> getSpuIdCondition() {
		return spuIdCondition;
	}

	/**
	 * 设置spuId查询条件
	 * 
	 * @param spuIdCondition spuId查询条件
	 */
	public void setSpuIdCondition(Condition<String> spuIdCondition) {
		this.spuIdCondition = spuIdCondition;
	}

	/**
	 * 构造并返回SkuId查询条件
	 * 
	 * @return skuIdCondition SkuId查询条件
	 */
	public Condition<String> skuId() {
		this.skuIdCondition = new Condition<>();
		return this.skuIdCondition;
	}
	
	/**
	 * 获取SkuId查询条件
	 * 
	 * @return skuIdCondition SkuId查询条件
	 */
	public Condition<String> getSkuIdCondition() {
		return skuIdCondition;
	}

	/**
	 * 设置SkuId查询条件
	 * 
	 * @param skuIdCondition SkuId查询条件
	 */
	public void setSkuIdCondition(Condition<String> skuIdCondition) {
		this.skuIdCondition = skuIdCondition;
	}

	/**
	 * 构造并返回数量查询条件
	 * 
	 * @return quantityCondition 数量查询条件
	 */
	public Condition<Integer> quantity() {
		this.quantityCondition = new Condition<>();
		return this.quantityCondition;
	}
	
	/**
	 * 获取数量查询条件
	 * 
	 * @return quantityCondition 数量查询条件
	 */
	public Condition<Integer> getQuantityCondition() {
		return quantityCondition;
	}

	/**
	 * 设置数量查询条件
	 * 
	 * @param quantityCondition 数量查询条件
	 */
	public void setQuantityCondition(Condition<Integer> quantityCondition) {
		this.quantityCondition = quantityCondition;
	}

	/**
	 * 构造并返回总数量查询条件
	 * 
	 * @return totalQuantityCondition 总数量查询条件
	 */
	public Condition<Integer> totalQuantity() {
		this.totalQuantityCondition = new Condition<>();
		return this.totalQuantityCondition;
	}
	
	/**
	 * 获取总数量查询条件
	 * 
	 * @return totalQuantityCondition 总数量查询条件
	 */
	public Condition<Integer> getTotalQuantityCondition() {
		return totalQuantityCondition;
	}

	/**
	 * 设置总数量查询条件
	 * 
	 * @param totalQuantityCondition 总数量查询条件
	 */
	public void setTotalQuantityCondition(Condition<Integer> totalQuantityCondition) {
		this.totalQuantityCondition = totalQuantityCondition;
	}

}
